#!/bin/bash
#删除工程目录

source /etc/profile
. $BEETLE_SHELL_PATH/error.sh

rmfun(){
	cd $1 || error_exit "进入文件夹$1失败"
	if [ -e $2 ]
	then
		rm -rf $2 || error_exit "删除文件夹$2失败"
	else
		echo "目录$1/$2不存在"
	fi
}

projectName=$1

if [ ! ${projectName} ]
then
    error_exit "参数存在空值projectName"
fi

rmfun /usr/local/beetle/config ${projectName}
rmfun /usr/beetle/appbak ${projectName}
rmfun /usr/beetle/applogs ${projectName}
rmfun /usr/local/beetle/code ${projectName}

rmfun /usr/local/python ${projectName}
rmfun /usr/local/python_vm ${projectName}

